<% content_for :page_head do %>
  <% unless @project.nil? %>
  <h1><%= @project.name %> 需求(<%= trans_current_state_to_chs(@project.state) %>)</h1>
  <% else %>
  <h1>需求列表</h1>
  <% end %>
<% end %>

<% unless @project.nil? %>
<% content_for :right_side do %>
  <div id="the_other_control">
    <%= link_to image_tag("add_icon.gif"), new_project_issue_path(:project_id => params[:project_id] || params[:id]), :class=>"image"%>
    <%= link_to "创建Issue", new_project_issue_path(:project_id => params[:project_id] || params[:id]), :class=>"grey" %>
  </div>
  <div id="the_other_control">
    <%= link_to image_tag("add_icon.gif"), new_project_requirement_path(:project_id => params[:project_id] || params[:id]), :class=>"image"%>
    <%= link_to "创建需求", new_project_requirement_path(:project_id => params[:project_id] || params[:id]), :class=>"grey" %>
  </div>
  <h2>对该项目进行操作</h2>
  <div id="the_other_control">
    <%= link_to image_tag("import_icon.gif"), change_state_project_path(@project), :class=>"image"%>
    <%= link_to get_project_state_op(@project.state), change_state_project_path(@project), :class=>"grey" %>
  </div>
  <br/>
  <div id="the_other_control">
    <%= link_to image_tag("download.gif"), export_csv_project_path(@project), :class=>"image"%>
    <%= link_to "导出Issue列表到Excel(CSV)", export_csv_project_path(@project), :class=>"grey" %>
  </div>
<% end %>
<% end %>

<% unless @requirements.empty? %>
  <div id="issue_list">
    <%= render :partial => "requirement" %>
  </div>
<% end %>
